<%@ page import="java.util.HashMap,common.CommonUtil,java.util.*,common.*" contentType="text/html; charset=utf-8" %>

<%
UserSession userSession = (UserSession)session.getAttribute("user"); 

//String login_id = null;
String user_id = null;

if(userSession!= null){
	//login_id = userSession.getLogin_id();
	user_id = userSession.getUser_id();
}

String site_url = request.getServerName().replace("http://","");

HashMap listMap=(HashMap)request.getAttribute("list_map");

HashMap map  = null;
ArrayList list=null;


if (listMap!=null){
    list=(ArrayList)listMap.get("mainContent");
}

String ent_id = null;
String ent_nm = null;
String ent_alias = null;
String addr = null;
String start_dt = null;

String close_dt = null;
String use_yn = null;
String service_gubun = null;

String ref_url = null;
String ref_chk_yn = null;
String test_cost = null;
String test_cost_discount = null;

String retest_period = null;

String opic_logo_nm = null;
String opic_logo_id = null;
String ts_logo_nm = null;
String ts_logo_id = null;
String prep_logo_nm = null;
String prep_logo_id = null;
String admin_logo_nm = null;
String admin_logo_id = null;

if(list != null){
	if(list.size() > 0){
		ent_id =  CommonUtil.nvl((String)((HashMap)list.get(0)).get("ent_id"));
		ent_nm = CommonUtil.nvl((String)((HashMap)list.get(0)).get("ent_nm"));
		
		ent_alias = CommonUtil.nvl((String)((HashMap)list.get(0)).get("ent_alias"));
		
		addr =  CommonUtil.nvl((String)((HashMap)list.get(0)).get("addr"));
		
		start_dt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("start_dt"));
		close_dt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("close_dt"));
		use_yn = CommonUtil.nvl((String)((HashMap)list.get(0)).get("use_yn"));
		
		service_gubun = CommonUtil.nvl((String)((HashMap)list.get(0)).get("service_gubun"));
		ref_url = CommonUtil.nvl((String)((HashMap)list.get(0)).get("ref_url"));
		ref_chk_yn = CommonUtil.nvl((String)((HashMap)list.get(0)).get("ref_chk_yn"));
		test_cost = CommonUtil.nvl((String)((HashMap)list.get(0)).get("test_cost"));
		
		test_cost_discount = CommonUtil.nvl((String)((HashMap)list.get(0)).get("test_cost_discount"));
		
		retest_period = CommonUtil.nvl((String)((HashMap)list.get(0)).get("retest_period"));
		
		opic_logo_nm = CommonUtil.nvl((String)((HashMap)list.get(0)).get("opic_logo_nm"));
		opic_logo_id = CommonUtil.nvl((String)((HashMap)list.get(0)).get("opic_logo_id"));
		ts_logo_nm = CommonUtil.nvl((String)((HashMap)list.get(0)).get("ts_logo_nm"));
		ts_logo_id = CommonUtil.nvl((String)((HashMap)list.get(0)).get("ts_logo_id"));
		
		prep_logo_nm = CommonUtil.nvl((String)((HashMap)list.get(0)).get("prep_logo_nm"));
		prep_logo_id = CommonUtil.nvl((String)((HashMap)list.get(0)).get("prep_logo_id"));
		
		admin_logo_nm = CommonUtil.nvl((String)((HashMap)list.get(0)).get("admin_logo_nm"));
		admin_logo_id = CommonUtil.nvl((String)((HashMap)list.get(0)).get("admin_logo_id"));
	}
}


%>
<jsp:include page="/jsp/common/header.jsp"></jsp:include>
<script language='javascript' src="/js/calendar.js"></script>
<script>


function go_ent(){
	var frm = document.mainform;	
	frm.cmd.value='ent_main';
	frm.action = '/speaking.pb';
	frm.target= '_self';              
	frm.submit();	
}

function go_modify(){
	var frm = document.mainform;
		
	frm.cmd.value='ent_select';
	frm.action = '/speaking.pb';
	frm.target= '_self';              
	frm.submit();	
}
</script>

<jsp:include page="/jsp/common/top.jsp"></jsp:include>
<jsp:include page="/jsp/common/submenu.jsp"><jsp:param name="submenu_id" value="ent_main" /><jsp:param name="submenu_idx" value="1" /></jsp:include>

<form name="mainform"  method="post" action = "/speaking.pb" >
	<div id="bodyContainer">
        <div id="contents">
          <jsp:include page="/jsp/common/submenu_list.jsp"><jsp:param name="submenu_id" value="ent_main" /><jsp:param name="submenu_idx" value="3" /></jsp:include>
          
          
          <div class="boxContainer">
            <dl title="기업보기">
              <dt>기업보기</dt>
            </dl>
            <table class="setupTb">
            
              <tr>
                <th>기업명</th>
                <td><%= ent_nm%></td>
              </tr>
              <tr>
                <th>기업 Alias</th>
                <td><%= ent_alias%> </td>
               
              </tr>
              <tr>
                <th>주소</th>
                <td><%= addr%></td>
              </tr>
              <tr>
                <th>시작일</th>
                <td><%= start_dt%> </td>
              </tr>
              <tr>
                <th>종료일</th>
                <td><%= close_dt%> </td>
              </tr>
              <tr>
                <th>사용구분</th>
                <td><%=(use_yn.equals("Y"))?"사용":"미사용" %></td> 
              </tr> 
              
              <tr>
                <th>서비스유무</th>
                <td><%=(service_gubun.equals("Y"))?"서비스":"서비스안함" %></td>
              </tr> 
              
              <!-- 
              <tr>
                <th>레퍼런스URL</th>
                <td><input type="text" name="ref_url" id="ref_url" style="width:300px" value="<%= ref_url%>"/></td>
              </tr> 
              <tr>
                <th>레퍼런스사용유무</th>
                <td><input type="radio" name="ref_chk_yn" id="ref_chk_yn" value='Y' <%=(ref_chk_yn.equals("Y"))?"checked":""%> />사용 <input type="radio" name="ref_chk_yn" id="ref_chk_yn" value='N' <%=(ref_chk_yn.equals("N"))?"checked":""%>/>미사용</td>
              </tr> 
               -->
               <input type="hidden" name="ref_url">
               <input type="hidden" name="ref_chk_yn" value="N">
              
              <tr>
                <th>재응시기간</th>
                <td><%= retest_period%>일</td>
              </tr> 
               
              <tr>
                <th>테스트비용</th>
                <td><%= test_cost%></td>
              </tr> 
              
              <%if(!site_url.equals("solution.dkeol.com")){ %>
              <tr>
                <th>OPIC 테스트 로고</th>
                <td>
                  <%if(!opic_logo_id.equals("")){ %>
	                <img src="/speaking.pb?cmd=download2&file_id=<%=opic_logo_id %>&file_name=<%=opic_logo_id %>&file_folder=datas" />
	              <%} %>
              </tr>
              
              <tr>
                <th>T/S 테스트 로고</th>
                <td>
                  <%if(!ts_logo_id.equals("")){ %>
	                <img src="/speaking.pb?cmd=download2&file_id=<%=ts_logo_id %>&file_name=<%=ts_logo_id %>&file_folder=datas" />
	              <%} %>
              </tr>
              
              <tr>
                <th>Speaking Test Prep 테스트 로고</th>
                <td>
                  <%if(!prep_logo_id.equals("")){ %>
	                <img src="/speaking.pb?cmd=download2&file_id=<%=prep_logo_id %>&file_name=<%=prep_logo_id %>&file_folder=datas" />
	              <%} %>
              </tr>
              
              <tr>
                <th>관리자 로고</th>
                <td>
                  <%if(!admin_logo_id.equals("")){ %>
	                <img src="/speaking.pb?cmd=download2&file_id=<%=admin_logo_id %>&file_name=<%=admin_logo_id %>&file_folder=datas" />
	              <%} %>
              </tr>
              <%} %>
              
              <tr>
                <th>할인가</th>
                <td><%= test_cost_discount%></td>
              </tr>            
            </table>
            <p><a href="#" onclick="go_modify()"><img src="img/btn_modify.gif" alt="수정" width="49" height="20" /></a> <a href="#" onclick="go_ent()"><img src="img/btn_list.gif" alt="목록" width="49" height="20" /></a> </p>
            
          </div>
          
        </div>
      </div>


<input type="hidden" name="cmd" value="">
<input type="hidden" name="user_id" value="<%=user_id %>">
<input type="hidden" name="ent_id" value="<%=ent_id %>">
<input type="hidden" name="id_chk" value="N">

</form>

<iframe name='hidden_frm'  width='0' height='0' SCROLLING='AUTO' frameborder='0'></iframe>
<jsp:include page="/jsp/common/footer.jsp"></jsp:include>
<jsp:include page="/jsp/common/bottom.jsp"></jsp:include>
